using UnityEngine;

public abstract class MeshAnimBase : MonoBehaviour
{
    public float m_minDuration = 0.3f;
    public float m_maxDuration = 0.7f;
    public float m_minDelay = 0f;
    public float m_maxDelay = 0.1f;
    protected int _count;

    private void Start()
    {
        Init();
        SetBeginState();
    }

    protected abstract void Init();
    protected abstract void SetBeginState();

    public virtual void StartAnimation(bool pForward)
    {
        if (pForward) PlayForwardAnimation();
        else PlayBackwardAnimation();
    }

    protected abstract void PlayForwardAnimation();
    protected abstract void PlayBackwardAnimation();
}
